﻿using log4net;
using Quartz;
using System.Threading.Tasks;

namespace EasyTask.EasyJobs.ShutDownJobs
{
    /// <summary>
    /// 定时关机任务
    /// </summary>
    [DisallowConcurrentExecution] //让任务中的延迟执行
    class ShutdownJob : IJob
    {
        private ILog logger = LogManager.GetLogger(nameof(ShutdownJob));

        public async Task Execute(IJobExecutionContext context)
        {
            //伪代码  xxHelper.ShutDown();
            logger.Info("时候不早了，关机睡觉");
            await Task.CompletedTask;
        }
    }
}
